<script>
    function getAjax(url) {
        var ajax = new XMLHttpRequest();
        ajax.open('get', url);
        ajax.send();
        ajax.onreadystatechange = function() {
            if (ajax.readyState == 4 && ajax.status == 200) {
                result = ajax.responseText;
                console.log(result);
                console.log('--------------------');
            }
        }
    }

    var url = 'http://132.232.87.95:3003/product/list?pageNum=1';
    getAjax(url);


    var url2 = 'http://132.232.87.95:3003/category/all';
    getAjax(url2);
</script>